#!/usr/bin/perl -w # for syntax highlighting
use gri_secmgr qw(get_user_name);
# CSS-V1

sub mm_admin_docrepos_sections_options {
my ($portal,$repname,$repnum)=@_;
my $grey="#c0c0c0";

	my $user_name=get_user_name();
	my ($docrepos_admin,$err)=$::GRI_FRONTEND->does_user_have_role($user_name,"docrepos_admin");

	#################################################################
	# If the user is not in the "user_admin" then we don't create	#
	# any links...							#
	#################################################################
	if($docrepos_admin==0) {
		return "
    <tr class=gri_row>
      <td colspan=2 class=gri_cell-disabled>&nbsp; &nbsp; Add New Document Section</td>
    </tr>
    <tr class=gri_row>
      <td colspan=2 class=gri_cell-disabled>&nbsp; &nbsp; Modify Existing Section Properties</td>
    </tr>
    <tr class=gri_row>
      <td colspan=2 class=gri_cell-disabled>&nbsp; &nbsp; Delete Exising Section</td>
    </tr>";
	}

	#################################################################
	# We now need to generate links to the docrepos_sections	#
	# admin pages ...						#
	#################################################################
	my $s="
    <tr class=gri_row>
      <td class=gri_cell colspan=2>&nbsp;&nbsp;";
	$s.=link_to_str("stdlink","Add New Document Section","form_docrepos_admin_add_section","");
	$s.="
      </td>
    </tr>";
	$s.="
    <tr class=gri_row>
      <td class=gri_cell colspan=2>&nbsp;&nbsp;";
	my $action=string_to_hex("Modify");
	$s.=link_to_str("stdlink","Modify Existing Section Properties","form_docrepos_admin_modify_section","action=$action");
	$s.="
      </td>
    </tr>";
	$s.="
    <tr class=gri_row>
      <td class=gri_cell colspan=2>&nbsp;&nbsp;";
	$action=string_to_hex("Delete");
	$s.=link_to_str("stdlink","Delete Existing Section","form_docrepos_admin_modify_section","action=$action");
	$s.="
      </td>
    </tr>";
	return $s;
}

1;
